﻿using System;

/*
 * We are given a string containing a list of forbidden words and a text containing
 * some of these words. Write a program that replaces the forbidden words with asterisks.
 */

namespace StringReplace
{
    class StringReplace
    {
        static void Main()
        {
            string[] forbiddenWords = { "Microsoft", "PHP", "CLR" };
            string text = "Microsoft announced its next generation PHP compiler today. It is based on .NET Framework 4.0 and is implemented as a dynamic language in CLR.";

            foreach (string word in forbiddenWords)
            {
                text = text.Replace(word, new String('*', word.Length));
            }

            Console.WriteLine(text);
        }
    }
}
